function mapToObject(map) {
	let obj = {};
    for(let [key,value] of map) {
        obj[key] = value;
    }
    return obj;
}
let map = new Map([['name','daxia'],['age',18]]);
let obj1 = mapToObject(map);
console.log(obj1);
// 或者

let obj2 = Object.fromEntries(map);
console.log(obj2);
